#include <stdio.h>

int main()
{
    int i = 0;
    int j = 0;
    int num = 0;
    scanf("%d", &num);
    printf("奇数列\n");
	for(int i=31; i>=1; i-=2)
	{
		printf("%d ", (num>>i)&1);
	}
    printf("\n");
	printf("偶数列\n");
	for(int i=30; i>=0; i-=2)
	{
		printf("%d ", (num>>i)&1);
	}
	printf("\n");
    return 0;
}